package cn.cau.epidemicsurveysystem.dao;

import cn.cau.epidemicsurveysystem.bean.StaffInfoBean;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface StaffInfoRepository extends JpaRepository<StaffInfoBean,Integer> {
    StaffInfoBean findStaffInfoBeanByStaffId(int staffId);
    StaffInfoBean findStaffInfoBeanByStaffNo(String staffNo);

    @Override
    <S extends StaffInfoBean> S save(S entity);

    @Override
    List<StaffInfoBean> findAll();

    List<StaffInfoBean> findStaffInfoBeansByStaffWorkStateAndStaffWorkAreaOrderByStaffNo(int state,String area);
    List<StaffInfoBean> findStaffInfoBeansByStaffWorkStateAndStaffWorkAreaAndStaffPositionOrderByStaffNo(int state, String area,String position);
}
